function trim(s)
  return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end

local txt = "   asfafadsfk  "
_,_,val = string.find(txt, "%s*(%S*)%s*");
print("||" .. val .."||")